package com.smartstate.IOC.controller;


import com.smartstate.IOC.dto.DataDTO;
import com.smartstate.IOC.dto.ReportDTO;
import com.smartstate.IOC.entity.Report;
import com.smartstate.IOC.service.HistoryService;
import com.smartstate.IOC.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@Slf4j
@Api(value = "环境历史曲线")
@RequestMapping("/history")
public class HistoryController {

    @Resource
    private HistoryService historyService;


    /**
     * 自定义查询历史曲线
     * @return
     */
    @ApiOperation(value = "自定义查询历史曲线")
    @GetMapping("/queryByDataDTO")
    public Map<String, List<Report>> queryByDataDTO() {
        return historyService.getHistoryCurveByDataDTO();
    }


}
